﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using WMS.FC.Domain.PersistenceObject.Business;
using WMS.FC.Infrastructure.Common;

namespace WMS.FC.Infrastructure.POConfig.Business
{
    public class TechnologyRecipeConfig : POBaseConfig<TechnologyRecipePO>
    {
        public override void InitializeData(EntityTypeBuilder<TechnologyRecipePO> builder)
        {
        }

        public override void MapColumn(EntityTypeBuilder<TechnologyRecipePO> builder, ref int index)
        {
            builder.HasComment("工艺配方表");
            builder.Property(entity => entity.TechnologyRouteProcessId).ConfigColumn("TECHNOLOGY_ROUTE_PROCESS_ID", "工艺路径工序ID").HasColumnOrder(index++);
            builder.Property(entity => entity.Step).ConfigColumn("STEP", "工步").HasColumnOrder(index++);
            builder.Property(entity => entity.ParamCode).ConfigColumn("PARAM_CODE", "参数编码", 50, true).HasColumnOrder(index++);
            builder.Property(entity => entity.ParamValue).ConfigColumn("PARAM_VALUE", "参数值", 50, true).HasColumnOrder(index++);
            builder.Property(entity => entity.WarehouseCode).ConfigColumn("WAREHOUSE_CODE", "仓库编码", 50, true).HasColumnOrder(index++);
        }

        public override void MapIndex(EntityTypeBuilder<TechnologyRecipePO> builder)
        {

        }
    }
}
